home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / comm / hstlxslt.zip / LK-U.SLT < prev    next >
Text File  |  1992-02-27  |  3KB  |  78 lines

  1.  
  2. ////////////////////////////////////////////////////////////////////////////////
  3. //       LK-U01.SLT                                                             //
  4. //       Telix Script to use HS/Link transfer protocol and generate           //
  5. //       a more informative "Log File"                                        //
  6. //                                                                            //
  7. //   Written for the "Public Domain" by Mr. Jiggs of Fotobeam/Brookside, Inc. //
  8. //                                                   260 Lexington St.        //
  9. //                                                   Waltham, Ma 02254-4613   //
  10. //                                                   Voice: (617) 893-1600    //
  11. //                                                     Fax: (617) 893-9951    //
  12. //                                                     BBS: (617) 893-6812    //
  13. //                                                                            //
  14. //   Note: I use the "Slow-Handshake" switch !!!                              //
  15. ////////////////////////////////////////////////////////////////////////////////
  16.  
  17. main () {
  18.          str Stripe[81]="════════════════════════════════════════════════════════════════════════════════";
  19.          str BaudRate[10], PortNum[2], Today[16], Now[16], LogFile[40];
  20.          str Switches[255], BoardName[30], Dummy[1];
  21.          int OpenOkay;
  22.  
  23.          if (getenv("DSZLOG", LogFile)) {
  24.              printsc("Using Standard Log File: ");
  25.              prints(LogFile);
  26.             }
  27.          else {
  28.              LogFile = "LINK.LOG";
  29.              printsc("Logging audit info to ");
  30.              prints(LogFile);
  31.             }
  32.  
  33.          Switches=" -HS -E";
  34. //             Note: The "Slow-Handshake" switch !!!                          //
  35.          itos(get_baud(),BaudRate);
  36.  
  37.          strcat(Switches, BaudRate);
  38.          strcat(Switches, " -P");
  39.  
  40.          itos(get_port(),PortNum);
  41.  
  42.          strcat(Switches, PortNum);
  43.          strcat(Switches, " ");
  44.          strcat(Switches,_ext_filespec);
  45.  
  46.          if ( (OpenOkay = fopen(LogFile,"a")) == 0) {
  47.                return;
  48.               }
  49.          else {
  50.                date(curtime(),Today);
  51.                time(curtime(),Now);
  52.                fputc(10,OpenOkay);
  53.                fputs(Stripe,OpenOkay);
  54.                fputc(10,OpenOkay);
  55.                fputs("HS/Link with ",OpenOkay);
  56.                fputs(_entry_name,OpenOkay);
  57.                fputs(" begun on ",OpenOkay);
  58.                fputs(Today,OpenOkay);
  59.                fputs(" at ",OpenOkay);
  60.                fputs(Now,OpenOkay);
  61.                fputc(10,OpenOkay);
  62.                fputs(Stripe,OpenOkay);
  63.                fputc(10,OpenOkay);
  64.                fclose(OpenOkay);
  65.               }
  66.  
  67.          run("HSLINK", Switches, 0);
  68.  
  69.          if ( (OpenOkay = fopen(LogFile,"a")) == 0) {
  70.                return;
  71.               }
  72.          else {
  73.                fputs(Stripe,OpenOkay);
  74.                fputc(10,OpenOkay);
  75.               }
  76.  
  77. }
  78.